package com.qf.service.impl;


import com.qf.dao.UserDao;
import com.qf.dao.impl.UserDaoImpl;
import com.qf.entity.User;
import com.qf.service.UserService;
import com.qf.utils.DruidUtil;

/*
杨威
2021/9/11
17:34
*/
public class UserServiceImpl implements UserService {
    UserDao userDao=new UserDaoImpl();
    @Override
    public User login(String userName, String passWord) {
        User user = userDao.select(userName);
        if(user==null){
            DruidUtil.close();
            return null;
        }
        if(user.getPassWord().equals(passWord)){
            DruidUtil.close();
            return user;
        }
        DruidUtil.close();
        return null;
    }
}
